﻿#region zh-CHS 2006 - 2008 DemoSoft 团队 | en 2006 - 2008 DemoSoft Team

//     NOTES
// ---------------
//
// This file is a part of the MMOSE(Massively Multiplayer Online Server Engine) for .NET.
//
//                              2006-2008 DemoSoft Team
//
//
// First Version : by H.Q.Cai - mailto:caihuanqing@hotmail.com

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published
 *   by the Free Software Foundation; either version 2.1 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

#region zh-CHS 包含名字空间 | en Include namespace
using System;
#endregion

namespace Demo.Mmose.Misc.Net.Dll
{
    #region zh-CHS 共有的事件数据类 | en Public EventArgs Class
    /// <summary>
    /// MessageBlock的事件数据类
    /// </summary>
    public class MessageBlockEventArgs : EventArgs
    {
        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 初始化构造
        /// </summary>
        /// <param name="baseWorld"></param>
        /// <param name="strText"></param>
        /// <param name="state"></param>
        public MessageBlockEventArgs( MessageBlock aceMessageBlock )
        {
            m_MessageBlock = aceMessageBlock;
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// BaseWorld的数据
        /// </summary>
        private MessageBlock m_MessageBlock = null;
        #endregion
        /// <summary>
        /// BaseWorld实例
        /// </summary>
        public MessageBlock MessageBlock
        {
            get { return m_MessageBlock; }
        }
        #endregion
    }

    /// <summary>
    /// ProcessMessageBlock的事件数据类(处理指定客户端数据的委托)
    /// </summary>
    public class ProcessMessageBlockAtServerEventArgs : MessageBlockEventArgs
    {
        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 初始化构造
        /// </summary>
        /// <param name="baseWorld"></param>
        /// <param name="strText"></param>
        /// <param name="state"></param>
        public ProcessMessageBlockAtServerEventArgs( MessageBlock aceMessageBlock, ServiceHandle aceClientHandlerAtServer, ServiceHandleManager aceSocketHandlerManagerAtServer )
            : base(aceMessageBlock)
        {
            m_ServiceHandle = aceClientHandlerAtServer;
            m_ServiceHandleManager = aceSocketHandlerManagerAtServer;
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ServiceHandle的数据
        /// </summary>
        private ServiceHandle m_ServiceHandle = null;
        #endregion
        /// <summary>
        /// ServiceHandle实例
        /// </summary>
        public ServiceHandle ServiceHandle
        {
            get { return m_ServiceHandle; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ServiceHandleManager的数据
        /// </summary>
        private ServiceHandleManager m_ServiceHandleManager = null;
        #endregion
        /// <summary>
        /// ServiceHandleManager实例
        /// </summary>
        public ServiceHandleManager ServiceHandleManager
        {
            get { return m_ServiceHandleManager; }
        }
        #endregion
    }

    /// <summary>
    /// ProcessMessageBlock的事件数据类(客户端处理指定断开的委托)
    /// </summary>
    public class ProcessMessageBlockAtClientEventArgs : MessageBlockEventArgs
    {
        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 初始化构造
        /// </summary>
        /// <param name="baseWorld"></param>
        /// <param name="strText"></param>
        /// <param name="state"></param>
        public ProcessMessageBlockAtClientEventArgs( MessageBlock aceMessageBlock, ConnectHandle clientHandlerAtClient, ConnectHandleManager socketHandlerManagerAtClient )
            : base( aceMessageBlock )
        {
            m_ConnectHandle = clientHandlerAtClient;
            m_ConnectHandleManager = socketHandlerManagerAtClient;
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ConnectHandle的数据
        /// </summary>
        private ConnectHandle m_ConnectHandle = null;
        #endregion
        /// <summary>
        /// ConnectHandle实例
        /// </summary>
        public ConnectHandle ConnectHandle
        {
            get { return m_ConnectHandle; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ConnectHandleManager的数据
        /// </summary>
        private ConnectHandleManager m_ConnectHandleManager = null;
        #endregion
        /// <summary>
        /// ConnectHandleManager实例
        /// </summary>
        public ConnectHandleManager ConnectHandleManager
        {
            get { return m_ConnectHandleManager; }
        }
        #endregion
    }

    /// <summary>
    /// Disconnect的事件数据类(处理指定客户端断开的委托)
    /// </summary>
    public class DisconnectAtServerEventArgs : EventArgs
    {
        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 初始化构造
        /// </summary>
        /// <param name="baseWorld"></param>
        /// <param name="strText"></param>
        /// <param name="state"></param>
        public DisconnectAtServerEventArgs( ServiceHandle clientHandlerAtServer, ServiceHandleManager socketHandlerManagerAtServer )
        {
            m_ServiceHandle = clientHandlerAtServer;
            m_ServiceHandleManager = socketHandlerManagerAtServer;
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ServiceHandle的数据
        /// </summary>
        private ServiceHandle m_ServiceHandle = null;
        #endregion
        /// <summary>
        /// ServiceHandle实例
        /// </summary>
        public ServiceHandle ServiceHandle
        {
            get { return m_ServiceHandle; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ServiceHandleManager的数据
        /// </summary>
        private ServiceHandleManager m_ServiceHandleManager = null;
        #endregion
        /// <summary>
        /// ServiceHandleManager实例
        /// </summary>
        public ServiceHandleManager ServiceHandleManager
        {
            get { return m_ServiceHandleManager; }
        }
        #endregion
    }

    /// <summary>
    /// Disconnect的事件数据类
    /// </summary>
    public class DisconnectAtClientEventArgs : EventArgs
    {
        #region zh-CHS 构造和初始化和清理 | en Constructors and Initializers and Dispose
        /// <summary>
        /// 初始化构造
        /// </summary>
        /// <param name="baseWorld"></param>
        /// <param name="strText"></param>
        /// <param name="state"></param>
        public DisconnectAtClientEventArgs( ConnectHandle aceClientHandlerAtClient, ConnectHandleManager aceSocketHandlerManagerAtClient )
        {
            m_ConnectHandle = aceClientHandlerAtClient;
            m_ConnectHandleManager = aceSocketHandlerManagerAtClient;
        }
        #endregion

        #region zh-CHS 共有属性 | en Public Properties
        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ConnectHandle的数据
        /// </summary>
        private ConnectHandle m_ConnectHandle = null;
        #endregion
        /// <summary>
        /// ConnectHandle实例
        /// </summary>
        public ConnectHandle ConnectHandle
        {
            get { return m_ConnectHandle; }
        }

        #region zh-CHS 私有成员变量 | en Private Member Variables
        /// <summary>
        /// ConnectHandleManager的数据
        /// </summary>
        private ConnectHandleManager m_ConnectHandleManager = null;
        #endregion
        /// <summary>
        /// ConnectHandleManager实例
        /// </summary>
        public ConnectHandleManager ConnectHandleManager
        {
            get { return m_ConnectHandleManager; }
        }
        #endregion
    }
    #endregion

    #region zh-CHS 委托 | en Delegate
    /// <summary>
    /// 处理指定客户端连接的委托
    /// </summary>
    /// <param name="NonceClientHandler"></param>
    /// <param name="AllHandlerManager"></param>
    /// <param name="ClientHandlerAtServer"></param>
    public delegate void EventDelegateAcceptor( ServiceHandle NonceClientHandler, ServiceHandleManager AllHandlerManager, out ServiceHandle ClientHandlerAtServer );
    #endregion
}
#endregion